// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class Frontgame extends cc.Component {

    @property(cc.Label)
    label: cc.Label = null;

    @property
    text: string = 'hello';

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {

    }

    // update (dt) {}
    click_TaoNiu(event, customEventData){
        cc.log("点击了牛头");
        cc.director.loadScene("game");
        this.node.removeFromParent();
        this.node.destroy();
    }
    click_Poker(event, customEventData){
        cc.log("点击纸牌游戏");
        cc.director.loadScene("SplashScene");
        this.node.removeFromParent();
        this.node.destroy();
    }
    click_Star(event, customEventData){
        cc.log("点击消灭星星");
        cc.director.loadScene("StarGame");
        this.node.removeFromParent();
        this.node.destroy();
    }
}
